//
//  WNLoading.m
//  Whatnet_iOS
//
//  Created by 北辰 on 2019/7/16.
//  Copyright © 2019 什么网络. All rights reserved.
//

#import "WNLoading.h"

static NSMutableArray *imageList = nil;
static NSMutableArray *videoJionImageList = nil;

//视频合成的加载视图
@implementation WNVideoJionLoading
- (instancetype)init
{
    self = [super init];
    if (self) {
        if (!videoJionImageList) {
            videoJionImageList = [NSMutableArray new];
            for (int i = 0;i < 45 ;i++) {
                NSString *imageName = [NSString stringWithFormat:@"loading-video_000%02d",i];
                UIImage *image = [UIImage imageNamed:imageName];
                [videoJionImageList addObject:image];
            }
        }
        self.animationDuration = 2.5;
        [self setAnimationImages:videoJionImageList];
    }
    return self;
}

@end

@implementation WNLoading
- (instancetype)init
{
    self = [super init];
    if (self) {
        
        if (!imageList) {
            imageList = [NSMutableArray new];
            for (int i = 16;i < 45 ;i++) {
                NSString *imageName = [NSString stringWithFormat:@"loading_000%d",i];
                UIImage *image = [UIImage imageNamed:imageName];
                [imageList addObject:image];
            }
        }
        self.animationDuration = 1.5;
        [self setAnimationImages:imageList];
    }
    return self;
}
 
@end
